package com.xiaoshuidi.cloud.module.contract.enums.contract;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 合同类型的枚举类
 *
 * @author 合房源码
 */
@Getter
@AllArgsConstructor
public enum ContractTypeEnum {

    PAPER("paper", "纸质合同"),
    ELECTRONIC("electronic","电子合同")
    ;

    private String code;
    private String msg;

    public static String getName(String code) {
        for (ContractTypeEnum c : ContractTypeEnum.values()) {
            if (c.getCode().equals(code)) {
                return c.msg;
            }
        }
        return null;
    }
}
